Skip to content

fix: handle database overload gracefully #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 30, 2023

Conversation

fenos
Copy link
Contributor

@fenos fenos commented Aug 30, 2023

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

When trying to acquire a connection on a overloaded database results in a 500 error

What is the new behavior?

This PR handle this error gracefully returning the following status codes:

  • 544
    • when a timeout occur while trying to acquire a connection
  • 429
    • When too many requests are sent concurrently and pgBouncer is unable to accept any more clients, resulting in max_client connection
    • When no more Postgres connections are allowed for these users

@fenos fenos force-pushed the fix/handle-database-overload-gracefully branch from 800b55f to 5dbb8a2 Compare August 30, 2023 11:30
@fenos fenos merged commit 2ab086d into master Aug 30, 2023
@fenos fenos deleted the fix/handle-database-overload-gracefully branch August 30, 2023 12:03
@github-actions
Copy link

🎉 This PR is included in version 0.41.6 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants